tests/libtest: Make temporary gpghome private
authorDan Nicholson <nicholson@endlessm.com>
Wed, 19 Jun 2019 16:51:47 +0000 (11:51 -0500)
committerDan Nicholson <nicholson@endlessm.com>
Fri, 24 Jan 2020 20:02:09 +0000 (13:02 -0700)
gpg prints a warning about unsafe permissions if the homedir is group or
world readable. This is just noise in the test logs, so appease it by
making the homedir 700.

tests/libtest.sh

index 00e69b12bc85c9e66177c177e1915e3027467b2b..c82bf487c67165b23d799e73da265e041e302305 100755 (executable)
@@ -85,12 +85,13 @@ export TEST_GPG_KEYFPR_2="7B3B1020D74479687FDB2273D8228CFECA950D41"
 export TEST_GPG_KEYID_3="0D15FAE7DF444D67"
 export TEST_GPG_KEYFPR_3="7D29CF060B8269CDF63BFBDD0D15FAE7DF444D67"
 
-# GPG when creating signatures demands a writable
+# GPG when creating signatures demands a private writable
 # homedir in order to create lockfiles.  Work around
 # this by copying locally.
 echo "Copying gpghome to ${test_tmpdir}"
 cp -a "${test_srcdir}/gpghome" ${test_tmpdir}
 chmod -R u+w "${test_tmpdir}"
+chmod 700 "${test_tmpdir}/gpghome"
 export TEST_GPG_KEYHOME=${test_tmpdir}/gpghome
 export OSTREE_GPG_HOME=${test_tmpdir}/gpghome/trusted